/*
 * @Author: 45F
 * @Date: 2019-07-19 15:08:05
 * @LastEditors: carol
 * @LastEditTime: 2019-10-31 10:35:50
 * @Description: 状态管理入口
 */
import Vue from 'vue'
import Vuex from 'vuex'

// 案事件
import asj from './module/asj'
import roleType from './module/roleType'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    loadding: false
  },
  mutations: {
    // loadding
    showloadding (state, load) {
      state.loadding = load
    }
  },
  actions: {
    setloadding (context, load) {
      context.commit('showloadding', load)
    }
  },
  getters: {
    isloading: (state) => {
      return state.loadding
    }
  },
  modules: {
    asj,
    roleType
  }
})
